package jcf;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class CollectionTest {
    public static void main(String[] args) {
        Collection<Integer> collection = new ArrayList<>();
        collection.add(1);
        collection.add(3);
        collection.add(5);
        collection.add(6);
        collection.add(2);
        System.out.println(collection.size());
        System.out.println(collection.remove(3));
        System.out.println(collection.size());
        collection.clear();
        System.out.println(collection.size());
    }
}
